const bizHelper = require('../../dbhelper/bizHelper');
const {
    handleError,
    handleSuccess
} = require('../../utils/handle');

module.exports.bizList = async(ctx, next) => {
    const bizList = await bizHelper.queryBizList();
    if (bizList) {
        handleSuccess({
            ctx,
            message: 'success!',
            result: bizList,
        });
    } else {
        handleError({
            ctx,
            message: 'failed...',
        });
    }
};